package StudyCode.summary.myfile;

import java.nio.file.FileStore;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetIsReadOnlyFileStores {
	public static void main(String[] args) {
		FileSystem fs = FileSystems.getDefault();
		for (FileStore store : fs.getFileStores()) {

			boolean is_read_only = store.isReadOnly();

			System.out.println("--- " + store.name() + " --- " + store.type());
			System.out.println("是否只读? " + is_read_only);
		}
	}
}
